import React, { useState, useEffect } from 'react';
import { HashRouter, Route, hashHistory } from 'react-router-dom'

import CacheRoute, { CacheSwitch } from 'react-router-cache-route';

// 移动端
import Mobile_cgrk_llj from './shipSRM/cgrk/mobile_cgrk_llj.js'
import Mobile_sltzd_llj from './shipSRM/cgrk/mobile_sltzd_llj.js'
import Mobile_qgd_form from './shipSRM/cgrk/mobile_qgd_form.js'
import Mobile_qgd_list from './shipSRM/cgrk/mobile_qgd_list.js'
import Mobile_bgd_list from './shipSRM/cgrk/mobile_bgd_list.js'
import Mobile_bgd_form from './shipSRM/cgrk/mobile_bgd_form.js'
import Mobile_cprk_list from './shipSRM/cgrk/mobile_cprk_list.js'
import Mobile_cprk_form from './shipSRM/cgrk/mobile_cprk_form.js'
import Mobile_gpd_list from './shipSRM/cgrk/mobile_gpd_list.js';
import Mobile_gpd_form from './shipSRM/cgrk/mobile_gpd_form.js';


//科创

import Login from './login.js'
import Mobile_login from './mobile_login.js'

import Mainpage_new from './mainpage_new.js'
import Mainpage_show from './mainpage_show.js'

import Mobile_mainpage from './mobile_mainpage.js'

//系统管理
import Dict_list from './shipSRM/sys/dict_list.js';
import Dict_form from './shipSRM/sys/dict_form.js';
import Oltable_list from './shipSRM/sys/oltable_list.js';
import Oltable_form from './shipSRM/sys/oltable_form.js';
import Czlog from './shipSRM/sys/czlog.js';
import Olreport_list from './shipSRM/sys/olreport_list.js';
import Olreport_form from './shipSRM/sys/olreport_form.js';
import Olseq_list from './shipSRM/sys/olseq_list.js';
import Olseq_form from './shipSRM/sys/olseq_form.js';
import Bgmenu_list from './shipSRM/sys/bgmenu_list.js';
import Bgmenu_form from './shipSRM/sys/bgmenu_form.js';
import Button_config from './shipSRM/sys/buttonConfig.js';
//业务角色
import Js_list from './shipSRM/sys/js_list.js';
import Js_form from './shipSRM/sys/js_form.js';
//通知公告
import Tzgg_list from './shipSRM/sys/tzgg_list.js';
import Tzgg_form from './shipSRM/sys/tzgg_form.js';
import Userinfo from './userinfo.js'


//供应商中心

import Gys_list from './shipSRM/gyszx/gys_list.js';
import Gys_form from './shipSRM/gyszx/gys_form.js';

import Gysbg_list from './shipSRM/gyszx/gysbg_list.js';
import Gysbg_form from './shipSRM/gyszx/gysbg_form.js';

import Gyspj_list from './shipSRM/gyszx/gyspj_list.js'; 
import Gyspj_form from './shipSRM/gyszx/gyspj_form.js';


//招标中心
// import Xm_list from './shipSRM/zbzx/xm_list.js';
// import Xm_form from './shipSRM/zbzx/xm_form.js';
import Xmxj_list from './shipSRM/zbzx/xmxj_list.js';
import Xmxj_form from './shipSRM/zbzx/xmxj_form.js';
import Xmtb_list from './shipSRM/zbzx/xmtb_list.js';
import Xmtb_form from './shipSRM/zbzx/xmtb_form.js';
import Xmjj_list from './shipSRM/zbzx/xmjj_list.js';
import Xmjj_form from './shipSRM/zbzx/xmjj_form.js';
import Zyjj_list from './shipSRM/zbzx/zyjj_list.js';
import Zyjj_form from './shipSRM/zbzx/zyjj_form.js';

import Xm_zb_form from './shipSRM/zbzx/xm_zb_form.js';
import Xm_kb_form from './shipSRM/zbzx/xm_kb_form.js';
import Xm_kb_list from './shipSRM/zbzx/xm_kb_list.js';
import Xmpb_list from './shipSRM/zbzx/xmpb_list.js';
import Xmpb_form from './shipSRM/zbzx/xmpb_form.js';

import Gysyb_list from './shipSRM/zbzx/gysyb_list.js';
import Gysyb_form from './shipSRM/zbzx/gysyb_form.js';
import Gysjb_list from './shipSRM/zbzx/gysjb_list.js';
import Gysjb_form from './shipSRM/zbzx/gysjb_form.js';
import Gysbqxj_list from './shipSRM/zbzx/gysbqxj_list.js';
import Gysbqxj_form from './shipSRM/zbzx/gysbqxj_form.js';
import Gysxj_list from './shipSRM/zbzx/gysxj_list.js';
import Gysxj_form from './shipSRM/zbzx/gysxj_form.js';
import Gystb_list from './shipSRM/zbzx/gystb_list.js';
import Gystb_form from './shipSRM/zbzx/gystb_form.js';
import Xm_sp_list from './shipSRM/zbzx/xmsp_list.js';
import Xm_sp_form from './shipSRM/zbzx/xmsp_form.js';
import Gyszb_list from './shipSRM/zbzx/gyszb_list.js';
import Gyszb_form from './shipSRM/zbzx/gyszb_form.js';
import Zbfp_list from './shipSRM/zbzx/zbfp_list.js';
import Zbfp_form from './shipSRM/zbzx/zbfp_form.js';
import Jjzc_list from './shipSRM/zbzx/jjzc_list.js';

//短信中心
import Fsjl_list from './shipSRM/dxzx/fsjl_list.js';







//基础信息
import Wlda_list from './shipSRM/baseinfo/wlda_list.js';
import Wlda_form from './shipSRM/baseinfo/wlda_form.js';


import Zcxx_list from './shipSRM/baseinfo/zcxx_list.js';
import Zcxx_form from './shipSRM/baseinfo/zcxx_form.js';

import Ry_list from './shipSRM/baseinfo/ry_list.js';
import Ry_form from './shipSRM/baseinfo/ry_form.js';

import Khda_list from './shipSRM/baseinfo/khda_list.js';
import Khda_form from './shipSRM/baseinfo/khda_form.js';

import Bmda_list from './shipSRM/baseinfo/bmda_list.js';
import Bmda_form from './shipSRM/baseinfo/bmda_form.js';

import Wlfl_list from './shipSRM/baseinfo/wlfl_list.js';
import Wlfl_form from './shipSRM/baseinfo/wlfl_form.js';

import Ckda_list from './shipSRM/baseinfo/Ckda_list.js';
import Ckda_form from './shipSRM/baseinfo/Ckda_form.js';

import Cpda_list from './shipSRM/baseinfo/cpda_list.js';
import Cpda_form from './shipSRM/baseinfo/cpda_form.js';


//库存管理
import Qtck_list from './shipSRM/kcgl/qtck_list.js';
import Qtck_form from './shipSRM/kcgl/qtck_form.js';
import Qtrk_list from './shipSRM/kcgl/qtrk_list.js';
import Qtrk_form from './shipSRM/kcgl/qtrk_form.js';

import Dbd_list from './shipSRM/kcgl/dbd_list.js';
import Dbd_form from './shipSRM/kcgl/dbd_form.js';



//合同中心
import Htmb_list from './shipSRM/htzx/htmb_list.js';
import Htmb_form from './shipSRM/htzx/htmb_form.js';
import Httz_list from './shipSRM/htzx/httz_list.js';
import Httz_form from './shipSRM/htzx/httz_form.js';
import Xymb_list from './shipSRM/htzx/xymb_list.js';
import Xymb_form from './shipSRM/htzx/xymb_form.js';
import Xygl_list from './shipSRM/htzx/xygl_list.js';
import Xygl_form from './shipSRM/htzx/xygl_form.js';

//报表
import Crkmx from './shipSRM/kc_report/crkmx.js';
import Sfc from './shipSRM/kc_report/sfc.js';
import Jskcmx from './shipSRM/kc_report/jskcmx.js';
import Scllhz from './shipSRM/kc_report/scllhz.js';
import Scllhz_print from './shipSRM/kc_report/scllhz_print.js';

//财务管理
import Xsfp_list from './shipSRM/cwgl/xsfp_list.js';
import Xsfp_form from './shipSRM/cwgl/xsfp_form.js';
import Gpd_list from './shipSRM/cwgl/gpd_list.js';
import Gpd_form from './shipSRM/cwgl/gpd_form.js';
import NotFound from './notFound.js';
import Tinymce from './shipSRM/newmes/tinymce.js';

const Routecontainer = () => {

  return (

    <div style={{
      position: 'relative', Left: '0', Right: '0', margin: 'auto',
      width: '100%', height: '100%', fontFamily: "Microsoft YaHei", backgroundColor: "#F1F1F1"
    }}>

      <HashRouter history={hashHistory}>

        <div style={{ position: "relative", width: '100%', height: '100%' }}>
          {/*春华汽配代码放这里*/}

          <Route exact path="/" component={Login} />

          <Route exact path="/mobile_login" component={Mobile_login} />
          <Route path="/shipSRM/userinfo" component={Userinfo} />

          <Route path="/shipSRM" component={Mainpage_new} />
          {/* 404 Route */}
          <Route path="/shipSRM/404" component={NotFound} />
          <Route path="/shipSRM/mainpage" component={Mainpage_show} />



          <Route path="/shipSRM/tinymce" component={Tinymce} />
          {/* 短信中心*/}
          <Route path="/shipSRM/dxzx/fsjl_list" component={Fsjl_list} />

          {/* 供应商中心*/}
          <CacheRoute path="/shipSRM/gyszx/gyslb" component={Gys_list}
            cacheKey="gyslb" />
          <CacheRoute path="/shipSRM/gyszx/gys_form" component={Gys_form}
            cacheKey="gys_form" />

          <CacheRoute path="/shipSRM/gyszx/gysbg_list" component={Gysbg_list}
            cacheKey="gysbg_list" />
          <CacheRoute path="/shipSRM/gyszx/gysbg_form" component={Gysbg_form}
            cacheKey="gysbg_form" />

          <CacheRoute path="/shipSRM/gyszx/gyspj_list" component={Gyspj_list}
            cacheKey="gyspj_list" />
          <CacheRoute path="/shipSRM/gyszx/gyspj_form" component={Gyspj_form}
            cacheKey="gyspj_form" />

          {/* 招标中心*/}
          {/* <Route path="/shipSRM/zbzx/xm_list" component={Xm_list}
            cacheKey="xm_list" />
          <CacheRoute path="/shipSRM/zbzx/xm_form" component={Xm_form}
            cacheKey="xm_form" /> */}
          <Route path="/shipSRM/zbzx/xmxj_list" component={Xmxj_list}
            cacheKey="xmxj_list" />
          <CacheRoute path="/shipSRM/zbzx/xmxj_form" component={Xmxj_form}
            cacheKey="xmxj_form" />
          <Route path="/shipSRM/zbzx/xmtb_list" component={Xmtb_list}
            cacheKey="xmtb_list" />
          <CacheRoute path="/shipSRM/zbzx/xmtb_form" component={Xmtb_form}
            cacheKey="xmtb_form" />
          <Route path="/shipSRM/zbzx/xmjj_list" component={Xmjj_list}
            cacheKey="xmjj_list" />
          <CacheRoute path="/shipSRM/zbzx/xmjj_form" component={Xmjj_form}
            cacheKey="xmjj_form" />
          <Route path="/shipSRM/zbzx/zyjj_list" component={Zyjj_list}
            cacheKey="zyjj_list" />
          <CacheRoute path="/shipSRM/zbzx/zyjj_form" component={Zyjj_form}
            cacheKey="zyjj_form" />
          <CacheRoute path="/shipSRM/zbzx/xm_zb_form" component={Xm_zb_form}
            cacheKey="xm_zb_form" />
          <CacheRoute path="/shipSRM/zbzx/xm_kb_list" component={Xm_kb_list}
            cacheKey="xm_kb_list" />
          <CacheRoute path="/shipSRM/zbzx/xm_kb_form" component={Xm_kb_form}
            cacheKey="xm_kb_form" />
          <Route path="/shipSRM/zbzx/xmpb_list" component={Xmpb_list}
            cacheKey="xmpb_list" />
          <CacheRoute path="/shipSRM/zbzx/xmpb_form" component={Xmpb_form}
            cacheKey="xmpb_form" />

          <Route path="/shipSRM/zbzx/gysyb_list" component={Gysyb_list}
            cacheKey="gysyb_list" />
          <CacheRoute path="/shipSRM/zbzx/gysyb_form" component={Gysyb_form}
            cacheKey="gysyb_form" />
          <Route path="/shipSRM/zbzx/gysjb_list" component={Gysjb_list}
            cacheKey="gysjb_list" />
          <CacheRoute path="/shipSRM/zbzx/gysjb_form" component={Gysjb_form}
            cacheKey="gysjb_form" />  
          <Route path="/shipSRM/zbzx/gysxj_list" component={Gysxj_list}
            cacheKey="gysxj_list" />
          <CacheRoute path="/shipSRM/zbzx/gysxj_form" component={Gysxj_form}
            cacheKey="gysxj_form" />
          <Route path="/shipSRM/zbzx/gystb_list" component={Gystb_list}
            cacheKey="gystb_list" />
          <CacheRoute path="/shipSRM/zbzx/gystb_form" component={Gystb_form}
            cacheKey="gystb_form" />
          <Route path="/shipSRM/zbzx/gysbqxj_list" component={Gysbqxj_list}
            cacheKey="gysbqxj_list" />
          <CacheRoute path="/shipSRM/zbzx/gysbqxj_form" component={Gysbqxj_form}
            cacheKey="gysbqxj_form" />
          <Route path="/shipSRM/zbzx/gyszb_list" component={Gyszb_list}
            cacheKey="gyszb_list" />
          <CacheRoute path="/shipSRM/zbzx/gyszb_form" component={Gyszb_form}
            cacheKey="gyszb_form" />
          <Route path="/shipSRM/zbzx/zbfp_list" component={Zbfp_list}
            cacheKey="zbfp_list" />
          <CacheRoute path="/shipSRM/zbzx/zbfp_form" component={Zbfp_form}
            cacheKey="zbfp_form" />
          <Route path="/shipSRM/zbzx/jjzc_list" component={Jjzc_list}
            cacheKey="jjzc_list" />


          <Route path="/shipSRM/zbzx/xm_sp_list" component={Xm_sp_list}
            cacheKey="xm_sp_list" />
          <CacheRoute path="/shipSRM/zbzx/xm_sp_form" component={Xm_sp_form}
            cacheKey="xm_sp_form" />

          {/* 系统管理*/}
          <CacheRoute path="/shipSRM/sys/oltable_list" component={Oltable_list}
            cacheKey="oltable_list" />
          <CacheRoute path="/shipSRM/sys/oltable_form" component={Oltable_form}
            cacheKey="oltable_form" />
          <CacheRoute path="/shipSRM/sys/czlog" component={Czlog}
            cacheKey="czlog" />


          <CacheRoute path="/shipSRM/sys/olreport_list" component={Olreport_list}
            cacheKey="olreport_list" />
          <CacheRoute path="/shipSRM/sys/olreport_form" component={Olreport_form}
            cacheKey="olreport_form" />
          <CacheRoute path="/shipSRM/sys/olseq_list" component={Olseq_list}
            cacheKey="olseq_list" />
          <CacheRoute path="/shipSRM/sys/olseq_form" component={Olseq_form}
            cacheKey="olseq_form" />


          <CacheRoute path="/shipSRM/sys/dict_list" component={Dict_list}
            cacheKey="dict_list" />
          <CacheRoute path="/shipSRM/sys/dict_form" component={Dict_form}
            cacheKey="dict_form" />
          <CacheRoute path="/shipSRM/sys/bgmenu_list" component={Bgmenu_list}
            cacheKey="bgmenu_list" />
          <CacheRoute path="/shipSRM/sys/bgmenu_form" component={Bgmenu_form}
            cacheKey="bgmenu_form" />
          <CacheRoute path="/shipSRM/sys/anpz_form" component={Button_config}
            cacheKey="anpz_form" />
          <CacheRoute path="/shipSRM/sys/js_list" component={Js_list}
            cacheKey="js_list" />
          <CacheRoute path="/shipSRM/sys/js_form" component={Js_form}
            cacheKey="js_form" />
          <CacheRoute path="/shipSRM/sys/tzgg_list" component={Tzgg_list}
            cacheKey="tzgg_list" />
          <CacheRoute path="/shipSRM/sys/tzgg_form" component={Tzgg_form}
            cacheKey="tzgg_form" />

          {/* 基础档案*/}
          <CacheRoute path="/shipSRM/baseinfo/wldalb" component={Wlda_list}
            cacheKey="wldalb" />
          <CacheRoute path="/shipSRM/baseinfo/wlda_form" component={Wlda_form}
            cacheKey="wlda_form" />

          <CacheRoute path="/shipSRM/baseinfo/zcxx_list" component={Zcxx_list}
            cacheKey="zcxx_list" />
          <CacheRoute path="/shipSRM/baseinfo/zcxx_form" component={Zcxx_form}
            cacheKey="zcxx_form" />


          <Route path="/shipSRM/baseinfo/rylb" component={Ry_list}
            cacheKey="ryda_list" />
          <CacheRoute path="/shipSRM/baseinfo/ry_form" component={Ry_form}
            cacheKey="ry_form" />

          <CacheRoute path="/shipSRM/baseinfo/khdalb" component={Khda_list}
            cacheKey="khdalb" />
          <CacheRoute path="/shipSRM/baseinfo/khda_form" component={Khda_form}
            cacheKey="khda_form" />
          <CacheRoute path="/shipSRM/baseinfo/bmdalb" component={Bmda_list}
            cacheKey="bmdalb" />
          <CacheRoute path="/shipSRM/baseinfo/bmda_form" component={Bmda_form}
            cacheKey="bmda_form" />

          <CacheRoute path="/shipSRM/baseinfo/wlfllb" component={Wlfl_list}
            cacheKey="wlfllb" />

          <CacheRoute path="/shipSRM/baseinfo/wlfl_form" component={Wlfl_form}
            cacheKey="wlfl_form" />


          <CacheRoute path="/shipSRM/baseinfo/ckda_list" component={Ckda_list}
            cacheKey="ckda_list" />
          <CacheRoute path="/shipSRM/baseinfo/ckda_form" component={Ckda_form}
            cacheKey="ckda_form" />
          <CacheRoute path="/shipSRM/baseinfo/cpda_list" component={Cpda_list}
            cacheKey="cpda_list" />
          <CacheRoute path="/shipSRM/baseinfo/cpda_form" component={Cpda_form}
            cacheKey="cpda_form" />


          {/* 库存管理*/}
          <CacheRoute path="/shipSRM/kcgl/qtck_list" component={Qtck_list}
            cacheKey="qtck_list" />
          <CacheRoute path="/shipSRM/kcgl/qtck_form" component={Qtck_form}
            cacheKey="qtck_form" />
          <CacheRoute path="/shipSRM/kcgl/qtrk_list" component={Qtrk_list}
            cacheKey="qtrk_list" />
          <CacheRoute path="/shipSRM/kcgl/qtrk_form" component={Qtrk_form}
            cacheKey="qtrk_form" />

          <CacheRoute path="/shipSRM/kcgl/dbd_list" component={Dbd_list}
            cacheKey="dbd_list" />
          <CacheRoute path="/shipSRM/kcgl/dbd_form" component={Dbd_form}
            cacheKey="dbd_form" />
          {/* 合同中心*/}
          <CacheRoute path="/shipSRM/htzx/htmb_list" component={Htmb_list}
            cacheKey="htmb_list" />
          <CacheRoute path="/shipSRM/htzx/htmb_form" component={Htmb_form}
            cacheKey="htmb_form" />
          <CacheRoute path="/shipSRM/htzx/httz_list" component={Httz_list}
            cacheKey="httz_list" />
          <CacheRoute path="/shipSRM/htzx/httz_form" component={Httz_form}
            cacheKey="httz_form" />
          <CacheRoute path="/shipSRM/htzx/xymb_list" component={Xymb_list}
            cacheKey="xymb_list" />
          <CacheRoute path="/shipSRM/htzx/xymb_form" component={Xymb_form}
            cacheKey="xymb_form" />
          <CacheRoute path="/shipSRM/htzx/xygl_list" component={Xygl_list}
            cacheKey="xygl_list" />
          <CacheRoute path="/shipSRM/htzx/xygl_form" component={Xygl_form}
            cacheKey="xygl_form" />


          {/*报表*/}
          <CacheRoute path="/shipSRM/report/crkmx" component={Crkmx}
            cacheKey="crkmx" />
          <CacheRoute path="/shipSRM/report/jskcmx" component={Jskcmx}
            cacheKey="jskcmx" />
          <CacheRoute path="/shipSRM/report/sfc" component={Sfc}
            cacheKey="sfc" />
          <CacheRoute path="/shipSRM/report/scllhz" component={Scllhz}
            cacheKey="scllhz" />
          <Route path="/shipSRM_one/report/scllhz_print" component={Scllhz_print}
          />



          {/* 财务管理*/}
          <CacheRoute path="/shipSRM/cwgl/xsfp_list" component={Xsfp_list}
            cacheKey="xsfp_list" />
          <CacheRoute path="/shipSRM/cwgl/xsfp_form" component={Xsfp_form}
            cacheKey="xsfp_form" />
          <CacheRoute path="/shipSRM/cwgl/gpd_list" component={Gpd_list}
            cacheKey="gpd_list" />
          <CacheRoute path="/shipSRM/cwgl/gpd_form" component={Gpd_form}
            cacheKey="gpd_form" />


          {/*移动端pda报工 移动端不要加记忆*/}
          <Route path="/shipSRM_mobile/mobile_mainpage" component={Mobile_mainpage} />

          <Route path="/shipSRM_mobile/cgrk/mobile_cgrk_llj" component={Mobile_cgrk_llj} />
          <Route path="/shipSRM_mobile/cgrk/mobile_sltzd_llj" component={Mobile_sltzd_llj} />
          <Route path="/shipSRM_mobile/cggl/mobile_qgd_form" component={Mobile_qgd_form} />
          <Route path="/shipSRM_mobile/cggl/mobile_qgd_list" component={Mobile_qgd_list} />
          <Route path="/shipSRM_mobile/cgrk/mobile_bgd_list" component={Mobile_bgd_list} />
          <Route path="/shipSRM_mobile/cgrk/mobile_bgd_form" component={Mobile_bgd_form} />
          <Route path="/shipSRM_mobile/cgrk/mobile_gpd_list" component={Mobile_gpd_list} />
          <Route path="/shipSRM_mobile/cgrk/mobile_gpd_form" component={Mobile_gpd_form} />
          <Route path="/shipSRM_mobile/scgl/mobile_cprk_list" component={Mobile_cprk_list} />
          <Route path="/shipSRM_mobile/scgl/mobile_cprk_form" component={Mobile_cprk_form} />

        </div>
      </HashRouter>

    </div>
  );


}

export default Routecontainer